Using Uncomplicated Firewall (ufw)

Installation

Debian based systems

sudo apt install ufw

Commands

Basic commands

Some port rules

Traffic commands

In ... must be one of the next rules. These rules are related to the ports of your machine (ports that could manage the traffic with web pages, for example, the https and http, both allow rendering web pages on your browser)

Ports

Rules for internet

Port Port Name
443 https
80 http
53 dns

Output

Here I will explain some outputs which probably you will see at the moment you execute ufw

Rule added # This means that a ipv4 rule has been added
Rule added (v6) # This means that a ipv6 rule has been added
References